/*
 * Rectangle.h
 *
 *  Created on: 2011/09/04
 *      Author: naoki
 */

#ifndef INCLUDED_NTENGINE_MATH_RECTANGLE_H
#define INCLUDED_NTENGINE_MATH_RECTANGLE_H

namespace NTEngine {
namespace Math {

/**
 * @brief 矩形
 */
class Rectangle {
public:
	int x;
	int y;
	int w;
	int h;

	/**
	 * @brief
	 */
	Rectangle() { }

	/**
	 * @brief
	 */
	Rectangle( int x, int y, int w, int h );

	/**
	 * @brief
	 */
	Rectangle( const Rectangle& );

	/**
	 * @brief
	 */
	bool contains( int x, int y ) const;
	bool contains( int x, int y, int w, int h ) const ;
	bool contains( const Rectangle& ) const;

	/**
	 * @brief 数値を設定します。
	 */
	void set( int x, int y, int w, int h );

	/**
	 * @brief operator's over load.
	 */
	void operator=( const Rectangle& );
	bool operator==( const Rectangle& ) const;
	bool operator!=( const Rectangle& ) const;
};

} // namespace Math
} // namespace NTEngine

#endif // INCLUDED_NTENGINE_MATH_RECTANGLE_H
